package com.baizhiedu.baizhiappsys.controller;

import com.baizhiedu.baizhiappsys.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @author lby
 */
@RequestMapping("index")
@Controller
public class IndexController {
    @Autowired
    private IndexService indexService;


    /**
     * 获取首页要展示的数据
     *
     用户访问量 userVisits
     视频播放量 videoPlayback
     视频购买量 videoPurchaseVolume
     用户量 userTotal
     课程量 courseTotal
     视频量 videoTotal
     合作企业数量 jointCompanyTotal
     * @return
     */
    @RequestMapping("getIndexData")
    @ResponseBody
    public Map getIndexData(){
        return indexService.getIndexData();
    }
}
